package com.bookyourtrek.action;


import java.util.ArrayList;
import java.util.Map;

import com.bookyourtrek.model.OrderModel;
import com.bookyourtrek.model.OrderSummaryPojo;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

@SuppressWarnings("serial")
public class OrderSummaryAction extends ActionSupport{

	private ArrayList<OrderSummaryPojo> ordersummarypojo = new ArrayList<OrderSummaryPojo>();
	
	public ArrayList<OrderSummaryPojo> getOrdersummarypojo() {
		return ordersummarypojo;
	}

	public void setOrdersummarypojo(ArrayList<OrderSummaryPojo> ordersummarypojo) {
		this.ordersummarypojo = ordersummarypojo;
	}

	public String ordersummary() {
		
		Map sess=ActionContext.getContext().getSession();
		String useremail = (String) sess.get("useremail");
		//System.out.println(useremail);
		OrderModel om = new OrderModel();
		ordersummarypojo = om.getordersummarybyuseremail(useremail);
		
		return SUCCESS;
	}
}
